package baseApi;

import static java.lang.System.arraycopy;

public class arrayCopy {
    public static void main(String[] args) {
        int[] arr01 = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        //int[9] arr02= {};//error!!! only new a array!
        int[] arr02 = new int[9];
        arraycopy(arr01, 1, arr02, 0, 7);//原数组，从原数组第几号开始，新数组，新数组几号，共有多长！
        for (int i : arr02) {
            System.out.println(i);
        }
    }
}
